<%@page pageEncoding="UTF-8" contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>用户密码修改页面</title>
<jsp:include page="../common/init.jsp"></jsp:include>
</head>
<base target="_self"/>
<%
 if(session.getAttribute("userInfo")==null)
 {
 	out.println("<script type=\"text/javascript\">alert('登录系统已超时，请重新登录！');parent.location=\""+request.getContextPath()+"/jsp/login.jsp\";</script>");
 }
 response.setHeader("Pragma", "No-cache");
 response.setHeader("Cache-Control", "no-cache");
 response.setDateHeader("Expires", 0);
%>
<script type="text/javascript">
//密码验证
function checkMima(checkId,checkValue,errorDivId,errorImgId){
	if(checkNullValue(checkValue)){
		showMenuDelegate(checkId,errorDivId,errorImgId,"密码不能为空!");
		return false;
	}
	else if (isSpecial(checkValue))
	{
		showMenuDelegate(checkId,errorDivId,errorImgId,"密码包含非法字符,请重新输入!");
		return false;
	}
	else if (checkValue.length>30)
	{
		showMenuDelegate(checkId,errorDivId,errorImgId,"密码长度不能超过30个字!");
		return false;
	}
	else
	{
		hiddenErrorImg(errorImgId);
		return true;
	}
}
//密码确认验证
function checkConfig(checkId,checkValue,errorDivId,errorImgId){
	if(checkNullValue(checkValue)){
		showMenuDelegate(checkId,errorDivId,errorImgId,"确认密码不能为空!");
		return false;
	}
	else if (isSpecial(checkValue))
	{
		showMenuDelegate(checkId,errorDivId,errorImgId,"确认密码包含非法字符,请重新输入!");
		return false;
	}
	else if (checkValue.length>30)
	{
		showMenuDelegate(checkId,errorDivId,errorImgId,"确认密码长度不能超过30个字!");
		return false;
	}
	else if(checkValue!=document.getElementById("appsysDlyh.mima").value)
	{
		showMenuDelegate(checkId,errorDivId,errorImgId,"设置密码与确认密码不相同,请重新输入!");
		return false;
	}
	else
	{
		hiddenErrorImg(errorImgId);
		return true;
	}
}
//提交
function doSubmit()
{
	var mimaFlag = checkMima("appsysDlyh.mima",document.getElementById("appsysDlyh.mima").value,'mimaDiv','mimaImg');
	var configFlag = checkConfig("configMima",document.forms[0].configMima.value,'configMimaDiv','configMimaImg');
	if(mimaFlag&&configFlag)
	{
		document.forms[0].action="<%=request.getContextPath() %>/qxgl/reworkMima.do";
		document.forms[0].submit();
	}
}
//页面关闭
function winClose()
{
	window.returnValue = "ok";
	window.close();
}
//表单reset
function formReset()
{
	document.forms[0].reset();
}
//生成功能按钮	
</script>
<body>
<s:form action="">
<table cellspacing="0" cellpadding="0" class="main_tab1">
    <tr>
        <td rowspan="4" class="main_tab1_td8">&nbsp;</td>
        <td class="main_tab1_td1"><img src="<%=request.getContextPath() %>/jsp/webmanager/images/img_ht_wz_28.gif" alt="left" /></td>
        <td class="main_tab1_td2">
		<div id="location">密码修改</div>
		</td>
        <td class="main_tab1_td1"><img src="<%=request.getContextPath() %>/jsp/webmanager/images/img_ht_wz_32.gif" alt="right" /></td>
    </tr>
    <tr>
        <td colspan="3" class="main_tab1_td3">
		<div id="mainbg">
		<div class="jiange10"></div>
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="main_tab3">
				<tr valign="bottom" height="30">
					<td height="25" colspan="2" align="left" valign="bottom"
						class="r_tab_c_4">
						&nbsp;
						<s:hidden name="appsysDlyh.id"></s:hidden>
						<s:hidden name="appsysDlyh.yhbh"></s:hidden>
						<s:hidden name="appsysDlyh.yhm"></s:hidden>
						<s:hidden name="appsysDlyh.mmwt"></s:hidden>
						<s:hidden name="appsysDlyh.mmts"></s:hidden>
						<s:hidden name="appsysDlyh.rybh"></s:hidden>
						<s:hidden name="appsysDlyh.scbz"></s:hidden>
						<s:hidden name="appsysDlyh.cjr"></s:hidden>
						<s:hidden name="appsysDlyh.cjrq"></s:hidden>
					</td>
				</tr>
				<tr valign="bottom" align="center" height="30" >
					<th align="right" width="100">
						用户名：
					</th>
					<td align="left" >
					<s:property value="appsysDlyh.yhm"/>
					</td>
				</tr>
				<tr valign="bottom" height="30">
					<th align="right">
						设置密码：
					</th>
					<td >
						<input type="password" id="appsysDlyh.mima" name="appsysDlyh.mima" size="20" maxLength="30" onclick="javascript: mouseClick('mimaDiv')" 
								onfocus="this.style.borderColor='#68A6F5'" onblur="checkMima(this.id,this.value,'mimaDiv','mimaImg');" class="inp_02">
						 &nbsp;
					<font color="#ff0000">*</font>
				<img src="" id="mimaImg" style="display:none;"/>
				<div id="mimaDiv" style="background:#008080;display:none;cursor:default"/>
					</td>
				</tr>
				<tr valign="bottom" height="30">
					<th align="right">
						密码确认：
					</th>
					<td >
					<input type="password" id="configMima" name="configMima" size="20" maxLength="30" onclick="javascript: mouseClick('configMimaDiv')" 
								onfocus="this.style.borderColor='#68A6F5'" onblur="checkConfig(this.id,this.value,'configMimaDiv','configMimaImg');"  class="inp_02">
						 &nbsp;
					<font color="#ff0000">*</font>
				<img src="" id="configMimaImg" style="display:none;"/>
				<div id="configMimaDiv" style="background:#008080;display:none;cursor:default"/>
					</td>
				</tr>
			</table>
<div class="butk">
<div class="btn_01">
<a href="#" onclick="doSubmit()">保&nbsp;存</a>
</div>
<div class="btn_01">
<a href="#" onclick="formReset()">清&nbsp;除</a>
</div>
</div>
</div>
</td>
    </tr>
    <tr>
        <td class="main_tab1_td4"><img src="<%=request.getContextPath() %>/jsp/webmanager/images/img_ht_wz_65.gif" alt="left" /></td>
        <td class="main_tab1_td5"></td>
        <td class="main_tab1_td4"><img src="<%=request.getContextPath() %>/jsp/webmanager/images/img_ht_wz_67.gif" alt="right" /></td>
    </tr>
    <tr>
        <td colspan="3" class="main_tab1_td7">&nbsp;</td>
    </tr>
</table>
<div id="Menu" style="background:#008080;display:none;cursor:default">
</div>
</s:form>
</body>
</html>
